var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();


app.Use(async (context, next) =>
{
    await context.Response.WriteAsync("First Start");
    await next();
    await context.Response.WriteAsync("First End");
});

app.Use(async (context, next) =>
{
    await context.Response.WriteAsync("Second Start");
    await next();
    await context.Response.WriteAsync("Second End");
});

app.MapGet("/", () => "Hello World!");

app.MapGet("/GetTime",()=>DateTime.Now.ToString());

app.Run();
